package com.uduemc.biso.web.exception;

import org.springframework.security.web.csrf.InvalidCsrfTokenException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExceptionController {

	@ExceptionHandler(value= {HttpRequestMethodNotSupportedException.class})
	public String httpRequestMethodNotSupportedException() {
		return "404";
	}
	
	@ExceptionHandler(value= {InvalidCsrfTokenException.class})
	public String invalidCsrfTokenException() {
		return "403";
	}
	
}
